<?
class base extends connect { 

	function ItemAsArray($res) { // returns MySQL results as a php array
		$item=array();
		while($result = mysql_fetch_assoc($res)){
			$arr_result=array();
			$c=0;
			while ($c < mysql_num_fields($res)) {        
				$field = mysql_fetch_field($res, $c);    
				$arr_result[$field -> name] = $result[$field -> name];
				$c++;
			}    
			$item = $arr_result;
		}    
		return $item;
	}
	function ItemsAsArray($res) { // returns MySQL results as a php array
		$items=array();
		$i=0;
		while($result = mysql_fetch_assoc($res)){
			$arr_result=array();
			$c=0;
			while ($c < mysql_num_fields($res)) {        
				$field = mysql_fetch_field($res, $c);    
				$arr_result[$field -> name] = $result[$field -> name];
				$c++;
			}    
			$items[$i] = $arr_result;
			$i++;
		}    
		return $items;
	}
}
?>